Error when asking for Location using expo-location - ios

I've beeing using expo-location since the beginning of my project, and didn't have any problem with this library.
And it is implemented as follow:
import * as Location from 'expo-location';
let { status } = await Location.getForegroundPermissionsAsync();
console.log('STATUS', status);
if (status === 'granted' && !getLocationPermissionStatus) {
setLocationPermissionStatus('granted');
}
But since today, when I've changed my machine and downloaded my project and setup everything again, the project is throwing this error when the notification is called.
Error: Permissions module not found. Are you sure that Expo modules are properly linked? checkPermissions$#http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:460494:32
I'd like some help on this issue.
ps.: I've expo-notifications being called on the same block of code and its not causing any issue.

Related

ReactNative [iOS] inquiry -> adding compassViewPosition in MapboxGL.MapView prop terminates the app, thoughts please?

I'm currently experiencing this issue https://github.com/rnmapbox/maps/issues/2514
wherein inside my code mapbox component, if compassViewPosition is added, it terminates the app without even throwing an error. anyone else encountered something related to this (read, passed through or dreamt about); feel free to comment out. Happy to get enlightened here.
import React from 'react';
import MapboxGL from '#rnmapbox/maps';
class BugReportExample extends React.Component {
render() {
return (
<MapboxGL.MapView
compassViewPosition={3} // adding this line terminates the app (not tested in android yet, and no error from try catch)
/>
);
}
}
I'm in "react-native": "~0.66.5" and I'm using "#rnmapbox/maps": "rnmapbox/maps#main",
Previous package I'm using was "#react-native-mapbox-gl/maps": "^8.5.0" and it works fine here. I'm trying to upgrade to the newer package (I know it's not on stable release yet but wanna know if I'm the only one experiencing this).

"help to fix ' error: unable to read property list from file: info.plist

I added Admob Google extension in to my Game Maker 2 project, when I try to test it on xcode for iOS, I am getting the error from xcode : unable to read property list from file: ...
Tried to fiddle around with the build settings in Xcode for plist to make it XML/Binary and same as input but nothing helped.
Made sure that the extensions in game maker have IOS enabled
Tried to clean build folder
Changed Locations: of Derived data to Relative
Looked for similar problems on google and stack overflow, but nothing exactly with the same issue
Below is the code given by Gamemaker
if os_type == os_ios
{
ads_app_id = "ca-app-pub-4724502015965127~5126911475";
banner_id = "ca-app-pub-4337965814269841/5893054134";
interstitial_id = "ca-app-pub-4724502015965127/8852681295";
rewarded_id = "ca-app-pub-4724502015965127/3717109960";
}
else
{
ads_app_id = "ca-app-pub-4337965814269841~8766033395";
banner_id = "ca-app-pub-4337965814269841/5893055122";
interstitial_id = "ca-app-pub-4337965814269841/5893055258";
rewarded_id = "ca-app-pub-4337965814269841/5893055399";
}
GoogleMobileAds_Init(interstitial_id, ads_app_id);
GoogleMobileAds_LoadInterstitial();
interstitial_loaded = false;
error:
unable to read property list from file:
/Users/faisalnaamani/GameMakerStudio2/iOS/GMS2IOS/Pixel_Bricks_iOS/Pixel_Bricks_iOS/Pixel_Bricks_iOS/Supporting
Files/Pixel_Bricks_iOS-Info.plist: The operation couldn’t be
completed. (XCBUtil.PropertyListConversionError error 1.)
The error is happening at Build time
I opened the plist file with ATOM, the one generated by GameMaker Studio when I noticed xcode could not read it. I noticed a bit of code that was causing an error and when I deleted it xcode was able to build. The code is below:
<key>NSAppTransportSecurity</key>\n\r<dict>\n\r
<key>NSAllowsArbitraryLoads</key>\n\r <true/>\n\r
<key>NSAllowsArbitraryLoadsForMedia</key>\n\r <true/>\n\r
<key>NSAllowsArbitraryLoadsInWebContent</key>\n\r <true/>\n\r</dict>
But I am not sure how to fix it to make it look correct. I am afraid if I delete it somehow the code will not be correct. Does anyone have a solution? And how would I fix it from GameMaker.
As Faisal suggested, the file cannot be read if it's malformed.
Trying to open the file with Xcode helped me find the problem: a syntax error. Xcode was very explicit about where the error might be: at line 32.
After fixing the error in another IDE I was able to open the file with Xcode and build/run my app.

UnityEditor.BuildPlayerWindow+BuildMethodException: when building Unity project for iOS

I am using Unity 2017.1.Op4 and I keep getting the following error when building the project for iOS:
UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors.
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x001b9] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:162
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:83
UnityEditor.HostView:OnGUI()
The build folder is also empty.
After making a Google search, a few recommended that I change the Product Name in the Player Settings.
Another workaround suggested: Clearing all errors and switching inspector to show Camera's components (it doesn't matter as long as it is not Player Settings window).
Both suggestions didn't work. How can I resolve this issue?
I just had this problem and solved. I hope this helps the next person with this problem.
My code contained wrong code like here:
#if UNITY_STANDALONE_WIN || UNITY_EDITOR
Correct Code Hear
#elif UNITY_ANDROID || UNITY_IPHONE
Compiled Error Code Hear
#else
#endif

iOS Asynchronous Unit Testing (waitForExpectations failing) in Xcode 8 / Swift 3

I'm updating my Cocoapod that I developed to use Swift 3. Before I upgraded, all of my asynchronous unit tests were working perfectly fine. But now after upgrading, every single one of them immediately fail and I have no idea why. Here is what each one is structured like:
override func setUp() {
super.setUp()
validationExpectation = expectation(description: "Validation")
}
.
.
.
func testSymbolRequest(){
_ = MyCocoapod.makeSymbolRequest(symbol: "ABC", success: { (symbolObject) in
self.validationExpectation.fulfill()
XCTAssert(true)
}) { (error) in
self.validationExpectation.fulfill()
XCTFail(error.description)
}
waitForRequestToFinish()
}
.
.
.
func waitForRequestToFinish(){
waitForExpectations(timeout: 60.0) { (error) in
if let error = error {
XCTFail(error.localizedDescription)
}
}
}
The waitForExpectations function isn't waiting at all. It immediately fails after being called. I have also confirmed that is has nothing to do with my actual networking code and the requests work perfectly fine in my Cocoapod example project. I'm using Alamofire. I don't think that's the problem but I thought it might be worth mentioning. The error message that is printed out is "unknown error".
If you are trying to test your CocoaPod that you are developing, for some reason, the default testing target that it creates makes the waitForExpectations() function not work properly for that particular testing target. I was able to get it to finally work by doing these steps in order:
Delete the current testing target
Create a new testing target
Run a pod install and make sure the pod file is updated accordingly
Following these steps, I was able to get the waitForExpectations() to finally work within my network requests.

phonegap plugin barcodescanner not working on iOS

We are developing application for phonegap (2.4.0) - iOS (6) and Android platforms. Our app is using BarcodeScanner plugin.
Plugin is working without any problems on Android, but we have detected some problems on iOS.
At first in the file CDVBarcodeScanner.mm CDVPlugin.h was not found, so we commented if/else check around this line: #import <CORDOVA/CDVPlugin.h> and to config.xml file we have added this line: <plugin name="org.apache.cordova.barcodeScanner" value="CDVBarcodeScanner" />
Then was build successfull without any errors, but after clicking on scan button nothing happened and nothing was written to output.
Then we compared barcodescanner.js for Android and iOS and found that after adding logs at the end of Android js file:
if(!window.plugins) {
console.log("something 1");
window.plugins = {};
}
if (!window.plugins.barcodeScanner) {
window.plugins.barcodeScanner = new BarcodeScanner();
console.log("something 2");
}
output was written after starting of application. In the case of iOS we have also added to similar part some console logs:
(function() {
if (!window.plugins) window.plugins = {}
console.log("something 1");
if (!window.plugins.barcodeScanner) {
window.plugins.barcodeScanner = new BarcodeScanner();
console.log("something 2");
}
else {
console.log("Not installing barcodeScanner: window.plugins.barcodeScanner already exists")
}
})
but no one was written.
Thanks for every advice.
We have tried these changes and plugin works:
we downgraded to phonegap 2.3
we set -O0 compile flags to zxing-all-in-one.cpp
checked all added libraries

Resources