iOS archiving, code signing, and exporting are fairly complex; the current implementation can only go so far esp. in some use cases, and the NS team has to constantly stay on top of it, like #2668.
Perusing ios-project-service, there are twists and turns to enable automatic or manual signing, juggle build configuration variables, hardcode xcodebuild parameters like exportOptionsPlist, etc.
I suggest ditching all of that stuff and plugging in fastlane. It does almost everything, does it flexibly, and is constantly updated and maintained; using it takes a big load off the shoulders of devs here.
Ping @NathanaelA @Plamen5kov
I already plan to build an helper npm module, which extracts all the build helpers from the customer project. We already have an build numbering , release notes from git and upload via fast lane
@hypery2k i was trying to setup fastlane for one of my projects, can you share your configs and if you have any advice, i would appreciate too
it's not finished yet, but there's an sample project with most of the code in it: https://github.com/holisticon/nativescript-ngx-demo
@vbresults tns prepare ios --release was supposed to make an Xcode project in platforms/ios that can further be run and debugged in Xcode, built using xcodebuild, published with fastlane.
Could you elaborate on "ditch iOS build code and implement fastlane".
@PanayotCankov What I mean is that everything after the prepare step should be handled with fastlane which can cover any use case, not coded/maintained by the NS team who are already busy.
Whenever I've tried to build with fastlane after preparing, two things happen:
build-release.xcconfig line 3: Unable to find included file "../plugins-release.xcconfig.@vbresults Webpack WIP: https://github.com/NativeScript/nativescript-cli/issues/2968
Once we split the preparation of the native plugins and resources from the preparation of .js files for the CLI built-in "bundling", we will be able to better suppress it and somehow either integrate the web pack into the CLI or decompose the CLI build steps on smaller tasks that can lead to better integration with the NativeScript webpack npm scripts.
On the other hand have you tried something like npm run build-ios-bundle ..., (this will do native build but still prepare the Xcode project in platforms/ios) and then run fastlane?
@PanayotCankov I see. I can't build with build-ios-bundle due to the issues mentioned in #3020. My environment has a limited amount of time for each build, so I can't build more than once at a time either.
@sis0k0, is it possible to do something like npm run prepare-ios-bundle --uglify?
Reading through this thread, is it possible to use FastLane for builds? I don't necessarily need it built into the TNS CLI right now but would love to use it for my own projects.
sure, see an example here.
Most helpful comment
I already plan to build an helper npm module, which extracts all the build helpers from the customer project. We already have an build numbering , release notes from git and upload via fast lane