Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all 16907 articles
Browse latest View live

Not able to customize Firebase Dynamic Link App preview

$
0
0

does anyone have experience in customising app preview page that Firebase Dynamic Links are opening before app or Appstore is open.

I am familiar with customising all social metadata properties, but how do you change "OPEN" label on the CTA button, and "Save my place in the app..." text - it always come in english no matter what device language or app default language is.

Any ideas please ?


Apple rejects my app because of using both AdsConsent and AppTrackingTransparency [closed]

$
0
0

I've just got this message from apple

We noticed your app includes App Tracking Transparency permissions requests, but it encourages or directs users to accept tracking. Specifically, your app directs the user to accept tracking in the following way(s):

  • A message asks users to reconsider their decision after they deny permission

I think the issue comes from where I call both AdsConstent and AppTrackingTransparency on the first lunch of the app.

Should I call the consent form(AdsConsent.showForm) on ios if I add AppTrackingTransparency?

React native change color scheme in real time problem android

$
0
0

What I'm doing is giving the user the possibility to change the color of the device scheme (light or dark) in real time.

On ios it works, when on the device I press the key combination: Command + Uppercase + A.

Event is intercepted, and the theme is changed in real time.

When on Android I try to change the theme color from the button menu, as you can see from the image.

enter image description here

The event is not intercepted I have to exit the app for a moment and then re-enter to make the changes happen.

I'm using import {useColorScheme} from 'react-native'.

I also tried import {useColorScheme} from 'react-native-appearance', but on ios the realtime thing doesn't work.

How can I solve?

Detox attempts to run Android test when none is specified

$
0
0

After following the basic instructions for setting up Detox for my simple example project, and running a successful detox build, detox test produces the output below, even though the the only test configuration I have in my package.json is for iOS:

{"name": "Learn","version": "0.0.1","private": true,"scripts": {"start": "node node_modules/react-native/local-cli/cli.js start","test": "jest"  },"dependencies": {"react": "16.4.1","react-native": "0.56.0"  },"devDependencies": {"babel-jest": "23.4.0","babel-preset-react-native": "5.0.2","detox": "^8.0.0","jest": "^23.4.1","react-test-renderer": "16.4.1"  },"jest": {"preset": "react-native"  },"detox": {"configurations": {"ios.sim.debug": {"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/Learn.app","build": "xcodebuild -project ios/Learn.xcodeproj -scheme Learn -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build","type": "ios.simulator","name": "iPhone 6"      }    },"test-runner": "jest"  }}

The file mentioned in the error was provided without changes by the install process and has the contents:

/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format */'use strict';module.exports = require('./configs/main');

Why does Detox fail to test my app?


node_modules/.bin/jest e2e --config=e2e/config.json --maxWorkers=1 --testNamePattern='^((?!:android:).)*$' FAIL  e2e/firstTest.spec.js● Test suite failed to run    Plugin 0 specified in "/Users/Rax/Documents/Projects/Coding/React/Learn/node_modules/babel-preset-react-native/index.js" provided an invalid property of "default" (While processing preset: "/Users/Rax/Documents/Projects/Coding/React/Learn/node_modules/babel-preset-react-native/index.js")      at Plugin.init (../node_modules/babel-core/lib/transformation/plugin.js:131:13)      at Function.normalisePlugin (../node_modules/babel-core/lib/transformation/file/options/option-manager.js:152:12)      at ../node_modules/babel-core/lib/transformation/file/options/option-manager.js:184:30          at Array.map (<anonymous>)      at Function.normalisePlugins (../node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)      at OptionManager.mergeOptions (../node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)      at ../node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:14      at ../node_modules/babel-core/lib/transformation/file/options/option-manager.js:323:22          at Array.map (<anonymous>)      at OptionManager.resolvePresets (../node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)Test Suites: 1 failed, 1 totalTests:       0 totalSnapshots:   0 totalTime:        1.869sRan all test suites matching /e2e/i with tests matching "^((?!:android:).)*$".child_process.js:643    throw err;    ^Error: Command failed: node_modules/.bin/jest e2e --config=e2e/config.json --maxWorkers=1 --testNamePattern='^((?!:android:).)*$'    at checkExecSyncError (child_process.js:603:11)    at Object.execSync (child_process.js:640:13)    at runJest (/Users/Rax/Documents/Projects/Coding/React/Learn/node_modules/detox/local-cli/detox-test.js:146:6)    at run (/Users/Rax/Documents/Projects/Coding/React/Learn/node_modules/detox/local-cli/detox-test.js:81:7)    at Object.<anonymous> (/Users/Rax/Documents/Projects/Coding/React/Learn/node_modules/detox/local-cli/detox-test.js:191:1)    at Module._compile (internal/modules/cjs/loader.js:689:30)    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)    at Module.load (internal/modules/cjs/loader.js:599:32)    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)    at Function.Module._load (internal/modules/cjs/loader.js:530:3)

UPDATE: When I follow the instructions below, I get:

 : Searching for device matching iPhone 6... : Booting device 7F2124D7-7A75-4702-9A88-926D0C5B884A : running "/usr/bin/xcrun simctl io 7F2124D7-7A75-4702-9A88-926D0C5B884A screenshot "/dev/null"" returned 27: stderr: An error was encountered processing the command (domain=SimulatorKit.SimDisplayScreenshotWriter.ScreenshotError, code=2):Error creating the image

Don't want Deep Link to redirect to browser

$
0
0

I am working on deep link/ universal link with react-native. When app is installed It redirects me to browser to open the application but I want app to directly open.

Incoming audio/video call with call keep when phone is locked or app is killed

$
0
0

React Native Callkeep with Twilio:Case 1 - App open( foreground) audio-video call coming with native UI ( Callkeep) working fineCase 2 - App open ( background ) audio-video call coming with native UI ( Callkeep) working fineCase 3 - App Close( Kill state) audio-video call not coming with native UI ( Callkeep) not workingCase 4 - App open Phone Lock audio-video call coming with native UI ( Callkeep) working fine But when answer call then native call UI appear on-screen phone not unlock and not load our app

ReactNative iOS Not able to Change to App Language When I make App release But working fine Debug Build?

$
0
0

I am not able to make release build with diffrent language like Italian. But Debug Build is working fine for iOS.

Step Of checking issues :

In release Build :-> Make Build for iOS in English Language. Is working fine-> After that go to setting in my iPhone -> General -> Change Language & Region English to Italian-> Again Go My App No any change from My Application-> Still woking fine form same when I make build in Debug and changes form iPhone side.

Can any one please help me for this.

Black-Berry Integration in iOS

$
0
0

After integration of Black-Berry in iOS(React-Native), when app launches on simulator, it got crashed.Error is :-

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Delegate property not set. Either call [GDiOS authorize:] and pass an object thatimplements the GDiOSDelegate protocol, or set the delegate property of the GDiOS instance priorto calling [GDiOS authorize].

Reference used :- https://github.com/blackberry/BlackBerry-Dynamics-React-Native-SDK/blob/master/modules/BlackBerry-Dynamics-for-React-Native-Base/README.md

Error Screenshot:-

enter image description here

Main.m class :-

enter image description here

AppDelegate.h :-

#import <React/RCTBridgeDelegate.h>#import <UIKit/UIKit.h>#import <BlackBerryDynamics/GD/GDiOS.h>@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate,GDiOSDelegate>@property (nonatomic, strong) UIWindow *window;@end

Using React Native Webview in iOS App is crashing intermittently

$
0
0

I have a react native iOS application (version 0.62.2) using react-native-webviewplugin latest version 11.x to render few webview screens in the App. Recently noticed in the crash logs that sometimes the webview screens crash intermittently on launch. Got below exception from the error logs of the sessions.

Error

NSInvalidArgumentException *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1]

Need inputs on the below point:

  1. How to decode this error? If I try to replicate the same behavior on xcode I get the error 1 out of 5 times and it points to the webview plugin.enter image description here

  2. Is there a way to try/catch this error so that the App at least does not crash? I tried error boundary but that will not catch this exception.

Any help is greatly appreciated.

How to create and save file to Files application (iOS platform)

$
0
0

I need to create PDF-file (done) and save it to Files application, so user can access it anytime outside of my app. I tried rn-fetch-blob and react-native-fs packages and they worked fine for Android, but for iOS they can only create files to internal app storage (so files are not created in external storage, i.e. not in iOS Files application).What options do I have to save my created files to Files application? I know that it is possible, i.g. Slack app allows saving files to Files app.

React Native - getProducts is empty in android react-native-iap

$
0
0

i had integrate react-native-iap for in-app purchase for ios and android. i had added the product ids on both store iTunes and play console. i also follow the code as example. the product list gets successfully in ios. but in android there will be blank.

Code :

const itemSkus = Platform.select({    ios: ['com.mapta.mepta.coin10',    ],    android: ['com.mapta.mepta.coin10',    ]});const products = await RNIap.getProducts(itemSkus);setProducts(products)console.log("=== products ===", products)

iOS Will get the products, But in android it's blank. please help me.

Thanks.

react-native check re-install by persistent storage

$
0
0

I have question about saving data into persistent storage (on Android),I want to check is user re-install this app on same device or not.I try react-native-sensitive-info and react-native-keychain to save data to keychain on IOS and SharedPreferences on android.IOS is working fine but on Android the data was erased which I can't check user has re-installed app or not.

On file AndroidManifest.xml I set

tools:replace="android:allowBackup" android:allowBackup="true" 

but it still not working. Do you have any suggestion?

React Native app crashes my iPhone when deployed in release mode

$
0
0

I am in a sticky situation and would appreciate any advice. My app is pretty much completebut when I am deploying it to my iPhone in release mode, my phone crashes when I try to hide the app. I mean, when you swipe up to go back to the home screen.

I have absolutely no idea what to do right now. it's only happening in release mode and it's giving me no error log while crashing so I don't even know where to look.

I don't know what code to show you guys so here's the whole project I guess:https://github.com/vivaanxr/YU-Food

Feel free to ask me to add any other additional details regarding this. This is my first project and kind of lost with this.

Need to show spinner on the basis of video events in 360 panorma view

$
0
0

We're using this plugin 360 panorama view in our react-native project to play HLS videos in 360 view mode. But we're facing a problem to show spinner because it doesn't give any video events so that we can show a spinner on the basis of events like when it buffers, loading in process, play started.

How to fix "Library not found for -lAdust" error in xcode 12.5

$
0
0

When i archive my react native app to publish to apple test flight, It'll failed every time with this error. Library not found for -lAdust

Xcode vesion: 12.5

React native version: 0.63.0

enter image description here


React Native pod install fails

$
0
0

When I run pod install I get the following error:

npx pod install
error: missing required argument `module|git:/

react-native version: 0.63.4
node version: 14.10.1
npm version: 6.14.8

Please note I'm running the whole operation on Windows 10, not MacOS...

Incase someone can clear it out if I need to even run pod install on windows or is it not needed after auto-linking is introduced?

My Package.json:

{"name": "CollegeApplication","version": "0.0.1","private": true,"scripts": {"android": "react-native run-android","ios": "react-native run-ios","start": "react-native start","test": "jest","lint": "eslint ."  },"dependencies": {"@react-native-community/async-storage": "^1.12.1","@react-native-community/cli-platform-ios": "^4.13.0","@react-native-community/masked-view": "^0.1.10","@react-native-community/netinfo": "^5.9.9","@react-navigation/bottom-tabs": "^5.11.2","@react-navigation/drawer": "^5.11.4","@react-navigation/native": "^5.8.10","@react-navigation/stack": "^5.12.8","axios": "^0.21.0","formik": "^2.2.5","react": "16.13.1","react-native": "0.63.4","react-native-awesome-alerts": "^1.4.2","react-native-camera": "git+https://git@github.com/react-native-community/react-native-camera.git","react-native-dotenv": "^2.4.3","react-native-gesture-handler": "^1.9.0","react-native-paper": "^4.4.1","react-native-permissions": "^3.0.0","react-native-qrcode-scanner": "^1.4.1","react-native-qrcode-svg": "^6.0.6","react-native-reanimated": "^1.13.2","react-native-safe-area-context": "^3.1.9","react-native-safe-area-view": "^1.1.1","react-native-screens": "^2.15.0","react-native-svg": "^12.1.0","react-native-vector-icons": "^7.1.0","yup": "^0.32.1"  },"devDependencies": {"@babel/core": "^7.8.4","@babel/runtime": "^7.8.4","@react-native-community/eslint-config": "^1.1.0","babel-jest": "^25.1.0","eslint": "^6.5.1","jest": "^25.1.0","metro-react-native-babel-preset": "^0.59.0","react-test-renderer": "16.13.1"  },"jest": {"preset": "react-native"  }}

PodFIle:

require_relative '../node_modules/react-native/scripts/react_native_pods'require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'platform :ios, '10.0'target 'CollegeApplication' do  config = use_native_modules!  use_react_native!(:path => config["reactNativePath"])  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'  pod 'RNSVG', :path => '../node_modules/react-native-svg'  pod 'react-native-camera', :path => '../node_modules/react-native-camera'  pod 'RNPermissions', :path => '../node_modules/react-native-permissions'  #reactNativePermissions for qrcode scanner https://github.com/moaazsidat/react-native-qrcode-scanner  permissions_path = '../node_modules/react-native-permissions/ios'  pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"  pod 'react-native-netinfo', :path => '../node_modules/@react-native-community/netinfo'  target 'CollegeApplicationTests' do    inherit! :complete    # Pods for testing  end  # Enables Flipper.  #  # Note that if you have use_frameworks! enabled, Flipper will not work and  # you should disable these next few lines.  use_flipper!  post_install do |installer|    flipper_post_install(installer)  endendtarget 'CollegeApplication-tvOS' do  # Pods for CollegeApplication-tvOS  target 'CollegeApplication-tvOSTests' do    inherit! :search_paths    # Pods for testing  endend

React native Pod install getting Permission denied

$
0
0

I'm created new project using command react-native init testprog
then change dir to testprog and pod install but it give permission denied error

$ pod installAnalyzing dependenciesFetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`Downloading dependenciesInstalling CocoaAsyncSocket (7.6.5)Installing DoubleConversion (1.1.6)Installing FBLazyVector (0.64.0)Installing FBReactNativeSpec (0.64.0)[!] /bin/bash -c set -emkdir -p /Volumes/MACMINI DATA SSD/testprog/node_modules/react-native/scripts/../React/FBReactNativeSpec/FBReactNativeSpec && touch /Volumes/MACMINI DATA SSD/testprog/node_modules/react-native/scripts/../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h /Volumes/MACMINI DATA SSD/testprog/node_modules/react-native/scripts/../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mmmkdir: /Volumes/MACMINI: Permission denied

I was try following things but it not working

  • update pod
  • reinstall pod
  • chown command for ~/.cocoapods
  • chown command for ~/Library/Caches/CocoaPods
  • chown command for /usr/local/bin/npm
  • chown command for /usr/local/bin/npx
  • chown command for /usr/local/bin/node

What is wrong?
How to resolve it?

Pod version: 1.10.1
Os Version: 10.15.7
react-native Version: 0.64.0

react native pod install fails with firebase

$
0
0

When Trying to run pod install for react native project , I got the following error

[!] Error installing Firebase――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――### Command

C:/Ruby30-x64/bin/pod install

### Report* What did you do?* What did you expect to happen?* What happened instead?### Stack

CocoaPods : 1.10.1Ruby : ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x64-mingw32]RubyGems : 3.2.15Host : Unable to find an executable (No such file or directory - sw_vers) ()Xcode : -version) ()Git : git version 2.23.0.windows.1Ruby lib dir : C:/Ruby30-x64/libRepositories : cocoapods - git - https://github.com/CocoaPods/Specs.git @ f587e47de45e30c653e2d258a78c364cbec08bb6

### Plugins

cocoapods-deintegrate : 1.0.4cocoapods-plugins : 1.0.0cocoapods-search : 1.0.0cocoapods-trunk : 1.5.0cocoapods-try : 1.2.0

### Podfile```rubyrequire_relative '../node_modules/react-native/scripts/react_native_pods'require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'platform :ios, '11.0'source 'https://github.com/CocoaPods/Specs.git'target 'BankSms' do  config = use_native_modules!  use_react_native!(    :path => config[:reactNativePath],    # to enable hermes on iOS, change `false` to `true` and then install pods    :hermes_enabled => false  )  target 'BankSmsTests' do    inherit! :complete    # Pods for testing  end  # Enables Flipper.  #  # Note that if you have use_frameworks! enabled, Flipper will not work and  # you should disable the next line.  use_flipper!()  post_install do |installer|    react_native_post_install(installer)  endend

Error

Errno::ENOENT - No such file or directory @ dir_s_mkdir - /Caches/CocoaPods/Pods/Release/Firebase/7.11.0-c121f/FirebaseInAppMessaging/Tests/Integration/FunctionalTestApp/ExternalAppExample/fiam-external-ios-testing-app/fiam-external-ios-testing-app/Assets.xcassets/AppIcon.appiconset

How to bypass that error ??

PhaseScriptExecution error in React Native app

$
0
0

Facing this error when I run react-native run-ios after creating the project

Error -

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening BoltAssignment.xcworkspace.Command line invocation:    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace BoltAssignment.xcworkspace -configuration Debug -scheme BoltAssignment -destination id=3E598855-6D4F-4F36-BEE1-8663A1F71787nvm is not compatible with the "PREFIX" environment variable: currently set to "/usr/local"Run `unset PREFIX` to unset it.nvm is not compatible with the "PREFIX" environment variable: currently set to "/usr/local"Run `unset PREFIX` to unset it.Command PhaseScriptExecution failed with a nonzero exit codewarning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Flipper-Glog' from project 'Pods')warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.4, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Flipper-PeerTalk' from project 'Pods')warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'libwebp' from project 'Pods')warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'YogaKit' from project 'Pods')warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the BoltAssignment editor. (in target 'BoltAssignment' from project 'BoltAssignment')warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Flipper-DoubleConversion' from project 'Pods')warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'boost-for-react-native' from project 'Pods')warning: no rule to process file '/Users/harsh_nagalla/dev/BoltAssignment/ios/Pods/Flipper-RSocket/rsocket/README.md' of type 'net.daringfireball.markdown' for architecture 'x86_64' (in target 'Flipper-RSocket' from project 'Pods')warning: no rule to process file '/Users/harsh_nagalla/dev/BoltAssignment/ios/Pods/Flipper-RSocket/rsocket/benchmarks/CMakeLists.txt' of type 'text' for architecture 'x86_64' (in target 'Flipper-RSocket' from project 'Pods')warning: no rule to process file '/Users/harsh_nagalla/dev/BoltAssignment/ios/Pods/Flipper-RSocket/rsocket/benchmarks/README.md' of type 'net.daringfireball.markdown' for architecture 'x86_64' (in target 'Flipper-RSocket' from project 'Pods')warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'RNFastImage' from project 'Pods')warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'SDWebImageWebPCoder' from project 'Pods')** BUILD FAILED **The following build commands failed:    PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/harsh_nagalla/Library/Developer/Xcode/DerivedData/BoltAssignment-cxeqsscopunscndrzxcrfnugkasb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-1F0D93C9412E4439D9C46216EB143B15.sh(1 failure)

Steps followed-

  1. yarn install
  2. start metro server
  3. cd ios -> pod install
  4. npx react-native run-ios

Pretty new to react native so I am totally clueless why this is happening. It would be much appreciated if someone can help with this.

If you have faced the same issue and still clueless like me then please share and upvote so it reaches to as many people as possible.

Swift parse object to JSON object

$
0
0

I am using shopify iOS SDK(mobile-buy-sdk-ios) in react native to get login user's orders.Here is my code,

let query = Storefront.buildQuery { $0        .customer(customerAccessToken: token) { $0          .orders(first: count, reverse: true) { $0                .edges { $0                    .node { $0                      .id()                      .orderNumber()                      .totalPrice()                      .statusUrl()                      .lineItems(first: 25){ $0                          .edges{ $0                              .node{ $0                                  .title()                                  .quantity()                                  .variant{ $0                                      .id()                                      .price()                                      .title()                                      .image{ $0                                          .originalSrc()                                      }                                  }                              }                          }                      }    let task  = self.client.queryGraphWith(query, cachePolicy: .networkOnly) { response, error in     error.debugUserPrint()     let userOrders = response.customer?.orders.edges[0].node;     let res = try! JSONSerialization.data(withJSONObject: userOrders)     completion([res])}

And I am getting this response in userOrders variable

<QueryRoot: ["customer": {    orders =     {        edges =         (                        {                node =                 {                    id = "Z2lkOi8vc2hvcGlmeS9PcmRlci8yMjY2NTM3NzU0NzEwP2tleT0zNWFiYzBkMjRmMDk3MjZlYzgzYjkwZDVlZGI5YjM4MA==";                    lineItems =                     {                        edges =                         (                                                        {                                node =                                 {                                    quantity = 1;                                    title = "Gift wrapping";                                    variant =                                     {                                        id = "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8xMjE3MzkzNjYyMzcwMg==";                                        image =                                         {                                            originalSrc = "https://cdn.shopify.com/s/files/1/2331/3377/products/Gift_Boxes_11_22_2017_Standard_1024x1024_60d01a1c-f665-4c9e-b80b-f6fda9167de3.jpg?v=1521444032";                                        };                                        price = "10.00";                                        title = "Default Title";                                    };                                };                            }                        );                    };                    orderNumber = 1040;                    statusUrl = "23313377/orders/11f378e7df2731521429f377015d2ec2/authenticate?key=35abc0d24f09726ec83b90d5edb9b380";                    totalPrice = "10.00";                };            }        );    };}]>)

this formate, so try to parse this data to JSON object to pass data from iOS function to javascript function. I have tried

JSONSerialization.data(withJSONObject: userOrders)

but it is not working. I just want to parse this data to JSON. I have also tried many other ways but no luck.

Thanks.

Viewing all 16907 articles
Browse latest View live