0

I have an Ionic 3 App using Enterprise Distribution for a client and of course Apple likes to change settings on their new iOS. Everything was working fine on iOS 11 and when a client-user upgraded to iOS 12 their app completely broke and could not re-download.

Steps I've Tried:

  • Check iOS Provisioning Profile Status
  • Rebuild App in Xcode 10.0
  • Archive and create new manifest and .ipa file for app
  • Rebuild app in npm using ionic cordova build ios --prod
  • Update any plugins that we're needing updates using npm outdated
  • Commit and Push to Production branch using ionic Deploy

Everything I've tried allowed me to build the app successfully and I was able to build the app locally on my device via Xcode, but as soon as I put the .ipa file on our server the app will not successfully download.

I have a feeling it may be a particular setting in Xcode, but I'm stuck right now. Any help would be appreciated.

Edit: After the update of Xcode 10, the app would no longer build successfully after running ionic cordova build ios

Stephen Romero
  • 2,812
  • 4
  • 25
  • 48

1 Answers1

3

So the issue was never apparent, but I somehow fixed the issue by removing the other branch from git and Ionic deploy and kept the Production branch active on the latest commit. I also created the certificate profile on Ionic Deploy using the Enterprise Developer Certificate and Provisioning Profile and packaged my app. I used the .ipa file from Deploy and threw it on the server and it worked like a charm.

EDIT: I finally found documentation on why the app breaks. When Xcode 10 was released, Apache Cordova did not and still does not have support for iOS if the user has Xcode 10 downloaded to build in the terminal. Link provided here: Xcode 10 Support.

When building the app using ionic cordova build ios or ionic cordova run ios You must run it like this: ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0". More information in the link provided.

EDIT: More possible answers can be found here. In some cases, users are experiencing similar yet different issues.

Stephen Romero
  • 2,812
  • 4
  • 25
  • 48
  • Can you please let me know how did you created .ipa file. Because when I tried to build with buildFlag and without buildFlag, It is not creating projName.xcworkspace in my Ionic 4 project with Xcode 10. can you please suggest me anything on this? – Darshana May 18 '19 at 12:58
  • We’re you able to successfully compile your app if you ran Ionic Cordova build iOS —prod —release – Stephen Romero May 18 '19 at 13:39
  • It is showing this status : 'testproj/platforms/ios/cordova/build-debug.xcconfig' CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES CODE_SIGN_IDENTITY = iPhone Developer ENABLE_BITCODE = NO GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/lib/include" "$(OBJROOT)/UninstalledProducts/include" "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" "$(BUILT_PRODUCTS_DIR)" IPHONEOS_DEPLOYMENT_TARGET = 8.0 OTHER_LDFLAGS = -ObjC SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h TARGETED_DEVICE_FAMILY = 1,2 – Darshana May 18 '19 at 14:09
  • Ionic Cordova build iOS —prod is not showing any success OR fail message and ending with above status. – Darshana May 18 '19 at 14:11
  • did you add --release to it also? And just to confirm you are using an apple computer correcct? – Stephen Romero May 18 '19 at 14:12
  • yes I have tried with Ionic Cordova build iOS —prod —release but getting same result and yes I am using mac with Xcode 10.1 – Darshana May 18 '19 at 14:26
  • So it should have built the xcode project for you in your Ionic Folder. Go to your project folder/ios/(nameofyourproject).workspace. It will open up xcode and then you can archive the app and create the .ipa file from there. – Stephen Romero May 18 '19 at 14:28
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/193555/discussion-between-darshana-and-stephen-romero). – Darshana May 18 '19 at 14:31
  • 1
    If it is not showing any this success or failure remove the device if it attached to the system. @StephenRomero – Vishwa Deepak Singh May 20 '19 at 11:27