Swiftlint
is best choice
Install Crashlytics
Upload dsym
file (using fastlane for auto do it)
Fastlane is best choice.
- Always read document (updated) https://fastlane.tools/ )
default_platform(:ios)
platform :ios do
desc "Build app and upload to Deploygate (ad-hoc version)"
lane :todeploygate do
increment_build_number
ver_no = get_version_number
build_no = get_build_number
build_app(
export_method: "ad-hoc",
)
deploygate(
api_token: ENV["DEPLOYGATE_API_KEY"],
user: ENV["DEPLOYGATE_GROUP_NAME"],
message: "Version #{ver_no} Build #{build_no}",
)
upload_symbols_to_crashlytics(dsym_path: "./ClothesMaker.app.dSYM.zip")
chatwork(
message: "App successfully push to deploygate. Version #{ver_no} Build #{build_no}",
roomid: ENV["CHATWORK_ROOM_ID"],
success: true,
api_token: ENV["CHATWORK_API_KEY"]
)
end
end
with .ENV
file example
DEPLOYGATE_API_KEY = "deploygate_api"
DEPLOYGATE_GROUP_NAME = "deploygate_group"
CHATWORK_API_KEY = "chatwork_api"
CHATWORK_ROOM_ID = chatwork_room_id
TLDR;
File > New File > iOS > Configuration Setting File
.
Named it ""
Project (click to Project icon in Project Navigator) > Info > Configurations >
Change Base on Configuration File
to your created .xcconfig
file name
Delete .xcworkspace
file, the Podfile.lock
, and the Pods/
directory. Do not delete the Podfile
.
Re Terminal pod install
(besure you are in the workspace's directory)
You will get the warning like this
CocoaPods did not set the base configuration of your project because your project already has a custom config set.
In order for CocoaPods integration to work at all, please either set the base configurations of the target `FavoriteCharacter` to `Pods/Target Support Files/Pods-FavoriteCharacter/Pods-FavoriteCharacter.development.xcconfig` or
include the `Pods/Target Support Files/Pods-FavoriteCharacter/Pods-FavoriteCharacter.development.xcconfig` in your build configuration (`FavoriteCharacter/Configure/Development.xcconfig`).
Copy the Pods/Target Support Files/Pods-FavoriteCharacter/Pods-FavoriteCharacter.development.xcconfig
open your .xcconfig
file, put
#include Pods/Target Support Files/Pods-FavoriteCharacter/Pods-FavoriteCharacter.development.xcconfig
Edit Build Configuration in <Scheme_Name> > Edit Scheme > Info > Build Configuration
Declair the key in .xcconfig
file like this
API_KEY = <your key>
API_URL = <your url>
Go to Info.plist
file, add line
Api_key = ${API_KEY}
Using in code
Bundle.main.infoDictionary?["Api_key"] as? String