It seems that my emulator and my iphone was pulling code from Ionic’s git.
When I was connected to the internet it was downloading some data and then I figured out that it was taking the code from Ionic’s git. When I was offline it was pulling my local code
I guess that’s the part of Ionic that makes it easy to update the app without actually uploading new version to the app store
Removed the cordova plugin. Changed the build number
UPDATE: for anyone that runs into my issue. This may not be a long term fix if I have to keep removing/adding the ios platforms to have successful builds but I hope not.
First build after removing platform ios:
=== BUILD TARGET Rewardzzz OF PROJECT Rewardzzz WITH CONFIGURATION Debug ===
Check dependencies
Code Signing Error: Signing for “Rewardzzz” requires a development team. Select a development team in the project editor.
Code Signing Error: Code signing is required for product type ‘Application’ in SDK ‘iOS 11.1’
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/simpledev/Development/Rewardzzz-App/platforms/ios/cordova/build-debug.xcconfig,-workspace,Rewardzzz.xcworkspace,-scheme,Rewardzzz,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,Rewardzzz.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/simpledev/Development/Rewardzzz-App/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/simpledev/Development/Rewardzzz-App/platforms/ios/build/sharedpch
[ERROR] An error occurred while running cordova build ios (exit code 1).
Then go to xCode and set provisioning profiles to manual and build again.
ionic cordova build ios
Then go back to xCode
Following the steps below:
Select the Target – > General → Signing → Select the Team (It must the Super account)
Then select the Build Settings in Target, keep the Development team with the same with Selected team. Set the Provisoning Profile with Automatic and Code Signing Identity with iOS Developer.
Select the Project – > Build Settings. Set the Provisoning Profile and Code Signing Identity with Details information
Run on device and it updated the files!
To send to Testflight
Project > Archive > Upload to TestFlight
“Now every time I dome some change I run ionic serve so my www folder is updated. Then I run ionic cordova prepare so it transfer www folder to platforms/ios. I don’t even have to clean project or delete DerivedData”