Coder Social home page Coder Social logo

Comments (18)

craigrouse avatar craigrouse commented on August 20, 2024 1

@raphaelmatori one suggestion - go into your platforms/ios directory and run pod update, just to make sure you're on the latest version of the underlying Tealium Swift SDK. Let me know if this helps.

from cordova-plugin.

raphaelmatori avatar raphaelmatori commented on August 20, 2024 1

Interesting... It is good to hear that you also saw it happening.
Thanks for taking care of it @craigrouse

from cordova-plugin.

craigrouse avatar craigrouse commented on August 20, 2024 1

@raphaelmatori Solution found! Thanks to this thread: fluttercommunity/plus_plugins#1955. The issue is that Xcode 15 has removed iOS 11 support. If your app (and installed pod dependencies) still have iOS 11 as the minimum deployment target, the crash occurs. You must change the minimum deployment target to iOS 12 to solve the issue. You can use this post install script in your podfile to force all minimum deployment targets to iOS 12:

post_install do |installer|
 installer.pods_project.targets.each do |target|
     target.build_configurations.each do |config|
        if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 12.0
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
        end
     end
 end
end

This immediately resolved the problem on my iOS 16.5.1 device.

from cordova-plugin.

raphaelmatori avatar raphaelmatori commented on August 20, 2024 1

But indeed, I do have a dependency on ionic calling target ios 11

  <config-file target="config.xml" parent="/*">
        <allow-navigation href="ionic://*"/>
        <preference name="deployment-target" value="11.0"/>
        <feature name="IonicWebView">
            <param name="ios-package" value="CDVWKWebViewEngine"/>
        </feature>
        <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine"/>
    </config-file>
    ```
I will take a look at it. Thank you very much!

from cordova-plugin.

craigrouse avatar craigrouse commented on August 20, 2024 1

Alright... But I have iOS 14 set as the minimum target.

But the Pods project that gets created will have iOS 11 set as the minimum, which is causing the issue - even if your app target is set to iOS 14.

from cordova-plugin.

craigrouse avatar craigrouse commented on August 20, 2024 1

The post install script will fix the issue for any Cocoapods dependencies you may have installed, so it's probably best to add it and keep it in there permanently. In Xcode, navigate to "Pods" in the left nav, and for each pod, check that the min deployment target of iOS 12 is set:
image

from cordova-plugin.

craigrouse avatar craigrouse commented on August 20, 2024 1

@raphaelmatori me too, but sometimes it's best not to ask questions ;-)
I'd say it's definitely a bug in the compiler - the fact it works in iOS 17 may be a side effect of some other change that took place in iOS 17. I'm glad it solved your issue anyway!

from cordova-plugin.

craigrouse avatar craigrouse commented on August 20, 2024

@raphaelmatori We'll look into this. Are you using our Ionic plugin, or your own custom wrapper around our Cordova plugin?

from cordova-plugin.

raphaelmatori avatar raphaelmatori commented on August 20, 2024

I am using your ionic plugin. I will also try a few things here, but it is quite hard to tell what is going on since the app just closes.
On emulators seem to be working fine. It just crashes on real devices.
If I find something new I will update it here.
Thanks!

from cordova-plugin.

raphaelmatori avatar raphaelmatori commented on August 20, 2024

Update: I tested today using iOS version 17.1.1 and it is working fine.
I will stick my investigations to either 16.3.1 or 16.7.2

from cordova-plugin.

craigrouse avatar craigrouse commented on August 20, 2024

Thanks for the update @raphaelmatori. We'll investigate also.

from cordova-plugin.

craigrouse avatar craigrouse commented on August 20, 2024

@raphaelmatori one other thing - are you able to get any crash logs when this happens? Is anything displayed in Xcode when you run the app on the device from Xcode with the debugger connected?

from cordova-plugin.

raphaelmatori avatar raphaelmatori commented on August 20, 2024

I'm trying to find someone on my team who has the previously mentioned versions (on a physical device) to validate the error.
Since I updated my device, the error now seems not to occur.
What I want to verify is whether it's indeed a consistent issue on those versions or if it was some kind of error that occurred only in my environment.

Unfortunately, I didn't capture the logs as I was testing an ad-hoc version of an .ipa file.

from cordova-plugin.

raphaelmatori avatar raphaelmatori commented on August 20, 2024

I was not able to find anyone with the above-mentioned iOS version on a real device.
Therefore, I will assume it was an environment mistake on my side until I find someone else experiencing the same.

from cordova-plugin.

craigrouse avatar craigrouse commented on August 20, 2024

@raphaelmatori thanks for the update. I have just found a device with iOS 16.5.1, and I think I may have been able to reproduce the issue. I suspect it's a thread-related issue, since this doesn't happen outside of Ionic/Cordova (and as you observed, not on the simulator either). Leave it with us and we'll see if we can find a solution. It's also possible that there's something wrong with the config on my test app that's causing the crash, but it seems likely it's the same crash you observed.

from cordova-plugin.

craigrouse avatar craigrouse commented on August 20, 2024

The specific crash I see is when we try to instantiate NWPathMonitor - I get a Bad Access exception. Hopefully it won't take long to track down the root cause.

from cordova-plugin.

raphaelmatori avatar raphaelmatori commented on August 20, 2024

Alright... But I have iOS 14 set as the minimum target.

from cordova-plugin.

raphaelmatori avatar raphaelmatori commented on August 20, 2024

Awesome!
I was able to find a phone with version 16.5 and indeed, the above suggested fix works!
I am just wondering why it works even without changing anything on ios 17 ...

from cordova-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.