Posts

iOS flutter while run to iPhone it had the error - Cannot find type 'PhoneNumberKit' in scope

 Problem: While develop the app in flutter and run in iPhone it shows the below error. Launching lib/main.dart on iPhone 16 Plus in debug mode... Xcode build done. 93.6s Failed to build iOS app Swift Compiler Error (Xcode): Cannot find type 'PhoneNumberKit' in scope /Users/mydevice/.pub-cache/ hosted/ pub.dev/libphonenumber_ plugin-0.3.3/ios/Classes/ SwiftLibphonenumberPlugin. swift:6:24  Could not build the application for the simulator. Error launching application on iPhone 16 Plus. Solution: In podfile update the below code. target ' Runner ' do use_frameworks ! use_modular_headers ! # Add This Line pod ' PhoneNumberKit ', ' ~> 3.7 . 6 ' flutter_install_all_ios_pods File .dirname( File .realpath(__ FILE__)) end Then run the command as follows cd ios        pod install --repo-update    rm -rf ~/Library/Developer/Xcode/ DerivedData    rm -rf ~/Library/Developer/Xcode/ DerivedData/ModuleC...

Flutter iOS - Permission all requested in flutter but not the default os alert shown while try to request permission

 Problem: Flutter iOS - Permission all requested in flutter but not the default os alert shown while try to request permission. In flutter request action called but alert not came. Solution: You have to add the below in your pod file and run it will works fine. post_install do | installer | installer. pods_project . targets . each do | target | flutter_additional_ios_build_ settings (target) target. build_configurations . ea ch do | config | # e.g. when you don't need camera permission, just add 'PERMISSION_CAMERA=0' config. build_settings [ 'GCC_ PREPROCESSOR_DEFINITIONS' ] ||= [ '$(inherited)' , ## dart: PermissionGroup.calendar 'PERMISSION_EVENTS=1' , ## dart: PermissionGroup.reminders 'PERMISSION_REMINDERS=1' , ## dart: PermissionGroup.calender 'PERMISSION_CALENDER=1' , ## dart: PermissionGroup.contacts 'PERMISSION_CONTACTS=1' , ...

Instructions integration with tab bar and cell in iOS swift

 Problem: I had integrated Instructions pod in my project.I want to integrate instructions in my project with tab bar with instructions as well as if cell available then show.Otherwise not show with cell instructions. Solution: The   below code will be used for get the frame for tab bar icons and collectionview header icon focus instructions. import  Instructions      var coachFrames:[CGRect] = []       var coachStrArray:[String] = []       //       #   MARK: - viewDidAppear       override func viewDidAppear(_ animated: Bool) {               addDemoFrames()           }       //       #   MARK: - add frames       func addDemoFrames() {               DispatchQueue.main.asyncAfter( deadline: .now() + .seconds(1), execute: {         ...

SiriExtension Interaction donation failed: Error Domain=IntentsErrorDomain Code=1901 "Cannot donate interaction with intent that has no valid shortcut types iOS swift

 Problem: I had tried to integrate sirikit on my project.Interaction donation failed: Error Domain=IntentsErrorDomain Code=1901 "Cannot donate interaction with intent that has no valid shortcut types The error code shown as above while try to run.How to solve that? Solution: Try to change your parameter to lowercase in your siri intents file ,then it will works. For example If you are created parameter Create new suggestion as a hint with parameters as "Title and Description" then change that to "title and description" then it will works fine.

Change project version no in general.But not updated while try to archieve.How to resolve?

Image
 Probelm: Change project version no in general.But not updated while try to archive. It was working on some projects and not working for me to this project. Solution: You can solve it by clear the xcode derived data, clean and build the project.If not resolved then try the following. Goto info.plist then check if updated.If not then update here and try to archive it will works fine.

System data has huge data - How to remove in Mac?

 Problem: System data has huge data.How can i delete the data and recover my spaces in my mac?. I had tried to delete xcode caches and other things but i'm not able to resolve. Solution: clear the the data inside the path that not used with device id you can find from xcode->menu->window->devices and simulator-.>simulator then it will show the identifier. You can check with the below device list and find the unused old one. you can remove the old and unused simulator data in the path to delete /Users/yourMac/Library/ Developer/CoreSimulator/ Devices. Because the xcode keeps the old simulators on the above path but it's not used in the new xcode. So it has huge data with unused.You can remove all and proceed. Then the system data will be low after doing this work.

Open maps with lat,long and link based iOS swift

 Problem: I want a common function that i can handle one location object with lat,long and address.That address can have a link that copied from other apps like google maps,Apple maps and whatsapp. Also want save option that will save the location into my app local database. How to achieve all the above us. Solution: func   openMaps ( lat :   Double , long :   Double , address : String   =   "" , isSave : Bool   =   true ) {       let   addressURL =   URL ( string : address. trimStr   ??   "" )       if   let   topview =   UIApplication . topViewControlle r () {           if   (lat != 0 && long != 0) {               let   actionSheet =   UIAlertController ( title :   "" ,   message :   "" ,   preferredStyle : . actionSheet )               if  ...