After two types of objects correctly inserted as nodes in an augmented reality setting, I replicated exactly the same procedure with a third kind of objects that unfortunately refuse to show up. I checked the flow and it is the same as the other objects as well the content of the LocationAnnotation, but there is surely something that escapes me. Could someone help with some ideas?
This is the common code, apart of the class:
func appendInAR(ghostElement: Ghost){
let ghostElementAnnotationLocation=GhostLocationAnnotationNode(ghost: ghostElement)
ghostElementAnnotationLocation.scaleRelativeToDistance = true
sceneLocationView.addLocationNodeWithConfirmedLocation(locationNode: ghostElementAnnotationLocation)
shownGhostsAnnotations.append(ghostElementAnnotationLocation)
}
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
When I try to post a LocationAnnotations of a subclass respect to the one defining variable sceneLocationView, by way of:
sceneLocationView.addLocationNodeWithConfirmedLocation(locationNode: bannerAnnotationLocation)
When I enter in:
public func addLocationNodeWithConfirmedLocation(locationNode: LocationNode) {
if locationNode.location == nil || locationNode.locationConfirmed == false {
return
}
updatePositionAndScaleOfLocationNode(locationNode: locationNode, initialSetup: true, animated: true)
locationNodes.append(locationNode)
print(sceneNode?.description ?? "nil")
self.sceneNode?.addChildNode(locationNode)
}
I find sceneNode to nil, like if the effect of the renderer is lost when subclassing. I also tried to create a new variable in the subclass also assigning SceneLocationView(), but sceneNode remains nil.
What to do to force it to assume a value?
I'm migrating my apps to the SceneKit platform that Apple request to adopt. Yet for an app with an iPad specific version I was not able to find the value in the ScenManifest to use to designate the iPad storyboard. May someone help?
Thanks.
I would like to modify the content of a published LocationNode upon been clicked by the user. But unfortunately:
func hitTest(_ point: CGPoint, options: [SCNHitTestOption : Any]? = nil) -> [SCNHitTestResult]
returns an SCNNode array from which it is impossible to retrieve the original LocationNode being inserted in order to be able to modify it.
Of course the solution would be to either insert the SCNNode corresponding to the inserted LocationNode in a custom class or conversely insert the identifier of the custom object as a tag of the LocationNode, in order to solve the issue. But both options seem impossible to implement.
May anyone help me?
When I execute:
geoCoder.reverseGeocodeLocation(location, completionHandler:{[weak self](placemarks, error) in
print("reverse geocoding location after altitude: ",location.altitude)
print("placemark location first", placemarks?.first?.location?.altitude ?? -1)
The input CLLocation has correct altitude 25, instead the location in the output placemarks have altitude 0, when of course they should have the same location. Moreover it is impossible to retrofit any data in the returned placemarks as they are portrayed as a read only property.
I need to elicit the location of the user in the Siri intents and so I call:
override init(){ super.init() self.locationManager=CLLocationManager() self.locationManager.delegate = self; self.locationManager.startUpdatingLocation() self.locationManager.requestWhenInUseAuthorization() }
Still neither
public func locationManagerDidChangeAuthorization(_ manager: CLLocationManager)
nor
public func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation])
are ever called, notwithstanding the presence of the correct entry in the info.plist, the inclusion of the library and the indication of the delegation with:
class IntentHandler: INExtension, INSendMessageIntentHandling, CLLocationManagerDelegate, UISceneDelegate
are ever called.
Is there any problem with CLLocation manager on intents? What would be a big problem as there is no way to share information with the main app!
I have a warning on my AR app Virtual Tags that since July does not show its camera information telling:
"ARCL.SceneLocationView implements focusItemsInRect: - caching for linear focus movement is limited as long as this view is on screen."
I tried inserting the function, but documentation does not explain what it should return and how to generate it. Is someone able to help me?
Thanks,
I have an app on the App Store for many years enabling users to post text into clouds in augmented reality. Yet last week abruptly upon installing the app on the iPhone the screen started going totally dark and a list of little comprehensible logs came up of the kind:
ARSCNCompositor <0x300ad0e00>: ARSCNCompositor (0, 0) initialization failed. Matting is not set up properly.
many times, then
RWorldTrackingTechnique <0x106235180>: Unable to update pose [PredictorFailure] for timestamp 870.392108
ARWorldTrackingTechnique <0x106235180>: Unable to predict pose [1] for timestamp 870.392108
again several times and then:
ARWorldTrackingTechnique <0x106235180>: SLAM error callback: Error Domain=Slam Error Code=7 "Non fatal error occurred due to significant drop in a IMU data" UserInfo={NSDescription=Non fatal error occurred due to significant drop in a IMU data, NSLocalizedFailureReason=SlamEngineNodeGroup Failure: IMU issue: gyro data stream verification failed [Significant data drop]. Failed on timestamp: 870.413247, Last known timestamp: 865.350198, Delta: 5.063049, System timestamp: 870.415781, Delta between system and frame: 0.002534. }
and then again the pose issues several times.
I hoped the new beta version would have solved the issue, but it was not the case. Unfortunately I do not know if that depends on the beta version or some other issue, given the app may be not installed on the Mac simulator.
I am trying to extract a protocol from an app to be able to use it in a siri intent. Yet when I compile it I get:
note: Injecting stub binary into codeless framework (in target 'Virtual Tags Framework' from project 'Virtual Tags Framework')
/Users/fabriziobartolomucci/Library/Developer/Xcode/DerivedData/Virtual_Tags_Framework-chxutmulwgujeiceazyyzaphwner/Build/Products/Debug-iphonesimulator/Virtual_Tags_Framework.framework/Frameworks/ARKit.framework/Versions/A: bundle format unrecognized, invalid, or unsuitable
Command CodeSign failed with a nonzero exit code
I‘m using a UITextView to allow users to post messages in AR in my app virtual tags - you may check by yourself, it is free - but it just allows to append text at end with no possibility of moving the cursor or do everything else. I opened a new project adding a UITextView and everything worked fine.
What could it be, and how to know more?
thanks, Fabrizio
Topic:
UI Frameworks
SubTopic:
UIKit
I am trying to compile on my iPhone XS device an app on Xcode Version 14.0 beta 2. First time I connected the device it correctly showed among the devices urging me to enable Developer Modality on Privacy & Security. I did it and the iPhone restarted, but once it happened the iPhone disappeared from the targets, thus not allowing me to compile on it. For some strange reason my iPad instead showed, but when I tried to compile on it, Xcode of course urged me to connect it.
So it seems Xcode sees not connected device and does not see connected devices.
Is anyone able to give a sense to that and possibly a solution?
While showing arifacts my app crashes abruptedly on:com.apple.scenekit.scnview-renderer (21): EXC_BAD_ACCESS (code=1, address=0xed0a7ac80)while I run it from Xcode.No crash is instead produced when running the app by itself.I tried not inserting or deleting nodes while Scenekit was rendering by means of a lock, but that changed nothing.I also submitted a ticket to Apple.Anyone else experiences it and has some solution?
Hullo,
I would like to send safari notification when the rss file on my website changes. There are several commercial service that grant it for a quite high monthly feed I may not afford for a non-commercial web site. Is there some tutorial about how to handle the thing both on the back-office and from office, in some way Apple presents a tutorial for the front office, but nothing for the back-office to communicate with it. May someone point me to a solution or a tutorial?
I am trying to implement web notifications for Safari with the following code in the client:
script
var pushId = "pushId";
var pushNotification = function () {
if ('safari' in window && 'pushNotification' in window.safari) {
var permissionData = window.safari.pushNotification.permission(pushId);
checkRemotePermission(permissionData);
} else {
alert("Push notifications not supported.");
}
};
var checkRemotePermission = function (permissionData) {
console.log("Chiamo checkRemotePermission");
if (permissionData.permission === 'default') {
window.safari.pushNotification.requestPermission(
'socket url'
pushId,
{},
checkRemotePermission
);
console.log("Requested");
} else if (permissionData.permission === 'denied') {
console.log("denied");
alert("denied");
} else if (permissionData.permission === 'granted') {
console.log("The user said yes, with token: "+ permissionData.deviceToken);
alert(permissionData.deviceToken)
}
};
/script
button name="subscribe" value="Activate Notifications" onclick="pushNotification()"Activate Notifications/button
And on the server side distributed by node.js:
var express = require('express');
var app = express();
var port = process.env.PORT || 3000;
console.log('entering on port: '+port)
app.listen(port);
app.get('/', function(req, res) {
console.log('get');
res.sendfile('index.html');
});
app.post('/v2/pushPackages/web.net.inarrivo.pizzomarinellafs', function(req, res) {
console.log('register');
res.sendfile('pushPackage.zip');
});
app.post(''socket url'/v2/devices/deviceToken/registation/pushId, function(req, res) {
console.log(res)
});
app.post(''socket url'/v2/log', function(req, res) {
console.log(res)
});
Yet I always receive 'denied' and it even seems the back office script is not even touched given no console log is written after the first one. The port on which it is listening is 3000, but I have no idea how to set it on the client side. What is strange is that if I change the url in:
window.safari.pushNotification.requestPermission(
'url2'
pushId,
{},
checkRemotePermission
);
to a dummy server I get the same denied answer, like the server were never connected anyway. May someone help to have this thing working?
Quite abrupdedly my project stopped executing by reporting error:error: WatchKit App doesn't contain any WatchKit Extensions. Verify that the value of NSExtensionPointIdentifier in your WatchKit Extension's Info.plist is set to com.apple.watchkit.Of course NSExtensionPointIdentifier is correctly set to com.apple.watchkit.What could it be and how to fix it?This is the relevant part of the info.plist file:<key>NSExtension</key> <dict> <key>NSExtensionAttributes</key> <dict> <key>WKAppBundleIdentifier</key> <string>com.information.inArrivo.watchkitapp</string> </dict> <key>NSExtensionPointIdentifier</key> <string>com.apple.watchkit</string> </dict>