Home Blog Page 3

Utilizing Software Calling to Supercharge Basis Fashions


Within the earlier tutorials, we explored how Basis Fashions work in iOS 26 and how one can begin constructing AI-powered options utilizing this new framework. We additionally launched the @Generable macro, which makes it straightforward to transform generated responses into structured Swift varieties.

Now, in Half 3 of the Basis Fashions sequence, we’ll dive into one other highly effective functionality: Software Calling — a characteristic that lets the mannequin work together along with your app’s features to carry out duties, retrieve information, or set off actions based mostly on person enter.

The on-device language mannequin isn’t able to answering each sort of query, particularly people who require real-time information, like the present climate or the newest inventory costs. In different circumstances, you may want the mannequin to entry your app’s personal information to reply precisely. That’s the place Software Calling is available in that it permits the mannequin to delegate particular duties to your app’s features or exterior APIs.

On this tutorial, we’ll prolong the Ask Me Something app. Whereas the on-device mannequin can deal with normal queries, it doesn’t have entry to up-to-date details about trending motion pictures. To bridge that hole, we’ll use Software Calling to combine with the The Film Database (TMDB) API, enabling the mannequin to reply to movie-related questions utilizing reside information.

tool-calling-trending-movies-demo.png

Utilizing TMDB APIs

In case you ask the Ask Me Something app about trending motion pictures, the on-device language mannequin received’t have the reply—it merely doesn’t have entry to that form of real-time data and should recommend checking different sources as a substitute. Let’s repair that utilizing Software Calling and the TMDB API. With this setup, each time a person asks a movie-related query, the mannequin received’t reply with “I don’t know.” As an alternative, it is going to robotically name the exterior API and return the related data instantly within the app.

Within the Xcode venture, create a MovieService file and insert the next code:

// Mannequin for a Film
struct Film: Codable, Identifiable {
    let id: Int
    let title: String
    let overview: String
    
    // Coding keys to match API response
    enum CodingKeys: String, CodingKey {
        case id
        case title
        case overview
    }
}

// Mannequin for the API response
struct TrendingMoviesResponse: Codable {
    let outcomes: [Movie]
}

// Service class to fetch trending motion pictures
class MovieService {
    // Base URL for TMDB API
    personal let baseURL = "https://api.themoviedb.org/3"
    
    personal let apiKey = ""
    
    // Operate to fetch trending motion pictures utilizing async/await
    func fetchTrendingMovies() async throws -> [Movie] {
        
        // Assemble the URL for trending motion pictures
        let urlString = "(baseURL)/trending/film/day?api_key=(apiKey)"
        guard let url = URL(string: urlString) else {
            throw URLError(.badURL)
        }
        
        // Carry out the community request
        let (information, response) = strive await URLSession.shared.information(from: url)
        
        // Verify for legitimate HTTP response
        guard let httpResponse = response as? HTTPURLResponse,
              (200...299).comprises(httpResponse.statusCode) else {
            throw URLError(.badServerResponse)
        }
        
        // Decode the JSON response
        let decoder = JSONDecoder()
        let trendingResponse = strive decoder.decode(TrendingMoviesResponse.self, from: information)
        return trendingResponse.outcomes
    }
}

Ensure you exchange the worth of apiKey with your personal TMDB API key. In case you haven’t signed up but, head over to themoviedb.org and register for a free account to get your API key.

The code above is pretty simple: it calls the net API to fetch trending motion pictures, then parses the response and decodes it into an array of Film objects.

Subsequent, we’ll use Software Calling to set off the code in MovieService each time the person asks about trending motion pictures. To get began, create a brand new file named GetTrendingMoviesTool.swift and add the next code:

import FoundationModels

struct GetTrendingMoviesTool: Software {
    let title = "getTrendingMovies"
    let description = "Get trending motion pictures and their data"
    
    let service = MovieService()

    @Generable
    struct Arguments {
        
    }
    
    func name(arguments: Arguments) async throws -> [String] {
        let motion pictures = strive await service.fetchTrendingMovies()
       
        let formattedMovies = motion pictures.map { film in
            "(film.title): (film.overview)"
        }
        
        return formattedMovies
    }
}

We outline a GetTrendingMovieTool struct that conforms to the Software protocol — that is the usual option to implement Software Calling within the Basis Fashions framework. The protocol requires you to specify a title and description for the instrument, together with an Arguments struct to symbolize any parameters the instrument would possibly want. On this case, we don’t require extra enter, so we outline an empty Arguments construction.

In case you needed to filter trending motion pictures by style, you could possibly outline Arguments like this:

@Generable
struct Arguments {
		@Information(description: "The style to fetch trending motion pictures")
		var style: String
}

When the instrument is triggered by the mannequin, the name methodology is robotically executed. Inside it, we name the fetchTrendingMovies() methodology from our service. After receiving the outcomes, we format them to show every film’s title and overview.

With the trending film instrument in place, integrating it into your app is easy. Merely open ContentView and replace the LanguageModelSession initialization as follows:

@State personal var session = LanguageModelSession(instruments: [GetTrendingMoviesTool()])

You may present customized instruments by passing them by way of the instruments parameter when initializing the language mannequin session. That’s it! The language mannequin will robotically invoke GetTrendingMoviesTool each time it detects a query associated to trending motion pictures.

Construct and run the app, then strive asking the identical query once more. This time, the mannequin will efficiently reply with trending film data by invoking the instrument.

tool-calling-trending-movies-ans.png

Abstract

On this tutorial, we explored instrument calling, a strong addition to the Basis Fashions framework in iOS 26. In contrast to fundamental textual content technology, instrument calling permits the on-device language mannequin to work together along with your app’s features or entry exterior companies.

With instrument calling, you possibly can considerably prolong the mannequin’s capabilities. Whether or not it’s operating customized logic or fetching real-time information by way of APIs, the mannequin can now carry out context-aware duties past its built-in information.

I hope you’ve loved this tutorial sequence and really feel impressed to begin constructing smarter, AI-powered options utilizing the Basis Fashions framework.

ios – SwiftData runtime crash utilizing Predicate macro with protocol-based generic mannequin


I am working with SwiftData and attempting to share logic throughout a number of fashions utilizing protocols and protocol extensions.

I’ve created some frequent protocols like Queryable, StatusRepresentable, and Trackable, which my SwiftData fashions (e.g., Pet) conform to.

My mannequin seems to be like this:

@Mannequin
last class Pet {
    var id: UUID
    var title: String
    var statusRaw: String
    // ... different properties
}

And I outline these protocols:

protocol StatusRepresentable: AnyObject, PersistentModel {
    var statusRaw: String { get set }
}

extension StatusRepresentable {
    var standing: Standing {
        get { Standing(rawValue: statusRaw) ?? .energetic }
        set { statusRaw = newValue.rawValue }
    }

    func changeStatus(to newStatus: Standing) {
        if newStatus != standing {
            self.updateTimestamp(onChange: newStatus)
            self.statusRaw = newStatus.rawValue
        }
    }
}

And:

protocol Queryable: AnyObject, Identifiable, StatusRepresentable, PersistentModel {}

extension Queryable {
    static var activePredicate: Predicate {
        .withStatus(.energetic)
    }

    static func predicate(for id: UUID) -> Predicate the place Self.ID == UUID {
        .withId(id)
    }
}

Here is the problematic half:

I’m utilizing a generic predicate extension like this:

extension Predicate {
    static func withStatus(_ standing: Standing...) -> Predicate {
        let rawValues = standing.map { $0.rawValue }
        return #Predicate {
            rawValues.comprises($0.statusRaw)
        }
    }
}

Then in my SwiftUI View, I exploit it like so:

struct ComponentActiveList: View {
    @Question non-public var activePets: [Pet]

    init() {
        self._activePets = Question(
            filter: .activePredicate, // or .withStatus(.energetic)
            type: .title,
            order: .ahead
        )
    }

    var physique: some View {
        // ...
    }
}

The issue:

It compiles high quality, however crashes at runtime with this error (simplified):

keyPath: .statusRaw
Thread 1: EXC_BREAKPOINT (code=1, subcode=0x...)

Within the expanded macro, I can see this:

Basis.Predicate({
    PredicateExpressions.build_contains(
        PredicateExpressions.build_Arg(rawValues),
        PredicateExpressions.build_KeyPath(
            root: PredicateExpressions.build_Arg($0),
            keyPath: .statusRaw
        )
    )
})

It looks like the macro is having hassle resolving .statusRaw through protocol extension / dynamic lookup. I am guessing this has one thing to do with SwiftData + `#Predicate being unable to resolve protocol-constrained properties at runtime?


Earlier than introducing protocols like Queryable and StatusRepresentable, I had this working by duplicating the predicate logic for every mannequin individually – for instance:

extension Predicate {
    static func pets(with standing: Standing...) -> Predicate {
        let rawValues = standing.map { $0.rawValue }
        return #Predicate {
            rawValues.comprises($0.statusRaw)
        }
    }

    static func pet(with id: UUID) -> Predicate {
        #Predicate { $0.id == id }
    }
}

As a workaround, I’ve at the moment reverted all of the protocol code and am duplicating the predicate logic for every mannequin straight. However ideally, I’d wish to outline these in a single place through protocols or generics.

ios – Why doesn’t onChange(of: @Question outcomes) fireplace when a SwiftData mannequin’s property adjustments?


Drawback Description

When utilizing SwiftUI’s @Question with SwiftData fashions, I encountered confusion about reactivity triggering. In sure conditions, SwiftUI’s reactivity mechanism would not work as anticipated when the MessageData array adjustments.

Information Mannequin Definition

@Mannequin
last class MessageData: Equatable {
    @Attribute(.distinctive) public var identify: String
    public var etag: String?

    public static func == (lhs: MessageData, rhs: MessageData) -> Bool {
        // If each have etag, examine etags
        if let lhsEtag = lhs.etag, let rhsEtag = rhs.etag {
            return lhsEtag == rhsEtag
        }
        return false
    }
}

struct MessageForDisplay {
    public textual content: String
}

SwiftUI View Code

struct ChannelChatView: View {
    @Question non-public var messages: [MessageData]
    @State non-public var displayMessages: [MessageForDisplay]
    var physique: some View {
        MessagesView(messages: displayMessages)
        .onChange(of: messages, preliminary: true) { _, _ in
            prepareDisplayMessages(messages: messages)
        }
    }

    func prepareDisplayMessages(messages: [MessageData]) {
        // rework [MessageData] to [MessageForDisplay]
        displayMessages = messages.map { message in
            MessageForDisplay(textual content: message.textual content)
        }
    }
}

Set off Situations Comparability

Situation Code Sample Triggers doSomething()? Clarification
Array parts added .onChange(of: messages) ✅ Triggers SwiftData detects array adjustments
Array parts eliminated .onChange(of: messages) ✅ Triggers SwiftData detects array adjustments
Particular person message.etag adjustments .onChange(of: messages) ❌ No set off SwiftData would not detect inside property adjustments
Utilizing .process(id: messages) .process(id: messages) ❌ No set off Similar challenge – would not detect inside property adjustments
Mapping etag array (onChange) .onChange(of: messages.map { $0.etag }) ✅ Triggers Explicitly displays etag adjustments
Mapping etag array (process) .process(id: messages.map { $0.etag }) ✅ Triggers Explicitly displays etag adjustments

Query
Why doesn’t onChange(of: messages) observe adjustments to properties of the objects returned by @Question? Is that this a limitation of SwiftData’s change monitoring, or am I lacking a unique sample for reacting to inside property adjustments?

Atmosphere

  • Xcode 16.3
  • iOS 18.1
  • Swift 6.1
  • SwiftData / SwiftUI

Any rationalization is appreciated!

Finest AI Brokers Improvement Firms in 2025


Your buyer writes to the chat at 11 p.m. to ask the place their order is. Inside seconds, they obtain not simply a solution but in addition a personalised suggestion and a coupon for his or her subsequent buy — all dealt with by an AI agent with out human involvement.

This isn’t a script-based bot however a fully-fledged digital executor that accesses databases, analyzes buyer conduct, and acts based mostly on enterprise logic. The scale of the marketplace for such options is rising exponentially from $13.8 billion in 2025 to $140.8 billion in 2032. On this article, we are going to point out the businesses that can maintain you forward.

Understanding AI Brokers: What They Are and How They Work

AI brokers are autonomous clever methods able to understanding targets, planning actions independently, adapting to modifications, and reaching outcomes with out fixed human intervention.

Not like conventional AI, which responds to particular person requests (e.g., “create a report”), AI brokers act proactively, break duties down into phases, work together with exterior providers, and make selections in actual time.

How they differ from conventional software program and AI methods:

Traits Conventional AI Agent AI
Focus Single process Focused methods
Initiative Reactive Proactive
Reminiscence and studying Restricted Lengthy-term reminiscence
Interplay Passive Energetic
Planning Easy Multi-step, goal-oriented

Comparability of Conventional AI vs Agent AI

Advantages of Implementing AI Brokers into Actual Enterprise Situations

The implementation of AI brokers into enterprise processes provides firms a robust enhance in automation, scalability, and value discount. These brokers take over routine duties — from dealing with requests to creating selections — working 24/7 with out compromising high quality.

AI brokers present sooner knowledge processing and decision-making, decrease human error and errors, and enhance the shopper expertise via personalised and prompt responses. With the power to research massive quantities of knowledge in actual time, AI brokers assist establish hidden patterns, predict consumer conduct, and reply shortly to market modifications.

Finest Methods to Implement AI Brokers into Actual Enterprise

For implementation to be efficient, nevertheless, it’s vital to obviously outline targets and launch the answer. When correctly configured, an AI agent shortly turns into not only a device, however a full-fledged member of the enterprise staff.

Equally vital is integrating the agent with key enterprise methods — CRM, databases, API platforms — so it will possibly function successfully in an actual surroundings somewhat than in isolation. With correct configuration and coaching, such brokers not solely improve enterprise operations but in addition turn out to be an integral a part of them.

Standards for Selecting an AI Agent Improvement Companion

When selecting an organization to develop AI brokers, you will need to contemplate not solely technical capabilities but in addition the general method to venture implementation, stage of experience, and readiness for long-term cooperation. Under are the important thing standards that can show you how to select a dependable and competent companion:

Criterion What to search for
Expertise Variety of years out there, accomplished tasks with AI brokers, case research in your {industry}.
Applied sciences Stacks and frameworks used (e.g., LLM, LangChain, RAG, Python, TensorFlow, and many others.).
Experience in customized AI agent growth Capability to create customized options tailor-made to the shopper’s enterprise processes.
Safety Compliance with requirements (GDPR, ISO), knowledge safety, entry management, safe integration.
Put up-support and upkeep Readiness for post-release help, staff coaching, AI consulting, common updates, and optimization.

Standards for Selecting an AI Agent Builder

Prime AI Agent Improvement Firms in 2025: Our Choice Standards

To establish the main AI agent builders in 2025, we now have analyzed firms based mostly on a variety of standards. Before everything, we evaluated their portfolio of accomplished tasks, together with each off-the-shelf options and customized developments. We additionally thought of shopper evaluations that confirmed the sensible worth and reliability of the collaboration.

Particular consideration was given to experience in AI agent growth — particularly, the power to construct clever brokers that work together successfully with customers, combine with IT infrastructure, and clear up particular enterprise issues.

As well as, we assessed how nicely firms sustain with the most recent developments in synthetic intelligence in 2025 — from using LLMs and RAG-based approaches to making sure the safety and scalability of their options.

Finest AI Brokers Improvement Firms in 2025

Prime 10 AI Agent Improvement Firms in 2025

In 2025, the manufacturing of AI brokers grew to become a key ingredient of digital transformation: from autonomous chatbots to complicated digital assistants. Under are the perfect firms that create customized AI brokers, combine generative AI, and show the effectiveness of their implementations.

1. SCAND – Customized AI Agent Improvement with Enterprise Experience

SCAND (Poland) has over 25 years of expertise in software program growth and efficiently implements tasks within the subject of synthetic intelligence, together with the creation of AI brokers.

Key areas of focus:

Customized brokers, voice assistants, chatbots, clever digital assistants.

  • Customization for industry-specific processes and integration into current IT infrastructure
  • Improvement method and AI instruments used:
  1. Agile methodologies, discovery workshops, PoC → MVP → full deployment
  2. OpenAI API, TensorFlow, Dialogflow, and Rasa
  3. RAG architectures, self-hosted or hybrid cloud-based options

Strengths:

Implementation instances:

2. Deviniti – Enterprise-Grade Generative AI & Customized Brokers

Deviniti is certainly one of Poland’s main AI firms with almost 20 years of expertise, specializing in safe, self-hosted AI agent growth.

Key areas of focus:

Generative brokers, PoC/MVP growth, RAG-based options, fine-tuned LLMs.

  • Business focus: Banking safety, authorized, and monetary sectors
  • Improvement method:
  1. Discovery workshops → PoC → enterprise deployment
  2. Self-hosted LLMs, RAG methods, multi-agent orchestration

Strengths:

  • A staff of ~330 AI specialists, licensed with ISO requirements
  • Full knowledge management, compliance with GDPR/HIPAA/SOC 2

Use case:

Credit score agent for Credit score Agricole: mechanically handles easy requests, routes complicated ones, and generates responses and PDF paperwork.

3. Grasp of Code World – Excessive-Complexity, Finish‑to‑Finish AI Agent Builds

Based in 2004, Grasp of Code World brings over 19 years of expertise in Conversational AI, LLM-based options, and enterprise agent growth.

What they provide:

  • Finish-to-end AI brokers: from conversational interface design to full backend integration
  • Multi-channel options (chat/voice), reasoning brokers, CRM/ERP integrations

Instruments and method:

ISO 27001 licensed, proprietary LOFT framework for accelerated supply and value discount.

Key benefits:

  • Expertise with world manufacturers (MTV, Burberry, T-Cellular, and others)
  • A staff of over 250 engineers, 400+ accomplished tasks, serving greater than 1 billion customers

Use instances:

Conversational interfaces with analytics and integration into large-scale enterprise methods.

4. ManoByte – Alignment‑Pushed Agentic Options for B2B

ManoByte focuses on growing AI brokers for mid-market and enterprise B2B shoppers, with a robust emphasis on understanding and aligning with enterprise logic. They specialise in integrating agentic options instantly into the shopper’s operational workflows.

AI solutions

Core areas of experience:

  • Figuring out ache factors in enterprise processes
  • Configuring multi-agent methods aligned with CRM and go-to-market technique

Strategy:

Course of modeling + course of intelligence + AI orchestration

Strengths:

  • Deep integration with the shopper’s lifecycle and strategic targets
  • Scalable options that develop alongside the enterprise

Use instances:

AI brokers for gross sales, advertising, and buyer help, enabling automated decision-making for B2B shoppers.

5. SoluLab – Cross‑Business AI Agent Deployment

SoluLab makes a speciality of AI agent options tailor-made for fintech, e-commerce, healthcare, and logistics sectors.

Main focus:

Autonomous brokers with multimodal enter capabilities (textual content, voice, picture, video), using AutoGen and Vertex AI Agent Builder.

Strategy:

Safe growth beneath ISO 27001, versatile architectures, multi-agent workflows, and behavioral coaching of brokers.

Key benefits:

  • Trusted by Fortune 500 shoppers corresponding to Disney and Goldman Sachs
  • Excessive technical adaptability and powerful shopper confidence

Use instances:

Voice-enabled AI agent for e-commerce. Coordination agent for logistics operations.

6. Markovate – Conversational & Advertising AI Brokers

Markovate makes a speciality of chat-based AI brokers and marketing-focused AI options, with a robust emphasis on personalization and buyer engagement.

Focus areas:

Context-aware brokers, retention advertising, and structured dialog workflows.

Strategy:

UX-first design, tone-aware responses, and in-depth behavioral analytics.

Strengths:

  • Superb for eCommerce and B2C tasks with excessive consumer engagement
  • Tailor-made options that drive personalised interactions and loyalty

Use instances:

AI agent for personalised advertising campaigns and automatic buyer interactions.

7. 10Clouds – Polish Product Home with AI Lab

10Clouds leverages its in-house AILab and proprietary AIConsole platform to create versatile, product-focused AI brokers.

Core focus areas:

Buyer help brokers, gross sales enablement, HR automation, healthcare assistants.

Strategy:

  • Seamless integration of design and ML engineering
  • Product-oriented agent growth with fast PoC cycles

Key benefits:

  • Sturdy UX groups combining design and AI experience
  • Quick turnaround from idea to functioning agent

Use instances:

UX-driven digital assistants and AI-based suggestion brokers.

8. NICE – CXone Mpower Orchestrator for Buyer Service Automation

NICE Ltd affords the CXone Mpower Orchestrator platform, delivering AI-driven automation for customer support, workflow orchestration, and Copilot functionalities.

What they do:

  • Built-in voice and chat brokers on the enterprise stage
  • Automation throughout each front- and back-office operations, dealing with large-scale workflows

Strategy:

Orchestrator-based structure, hybrid AI fashions, integration of a number of LLMs and APIs.

Key strengths:

  • Excessive reliability and scalability
  • Confirmed automation charges above 60%
  • Multi-million greenback ROI for shoppers

Use instances:

AI brokers for contact facilities, fintech, and telecom automation options.

9. SoundHound – Voice-First AI Brokers

SoundHound makes a speciality of voice-first AI brokers constructed on the Amelia 7.0 platform, with a robust concentrate on healthcare and affected person interplay.

Key focus areas:

Voice-first AI brokers, superior NLP for speech understanding, and conversational voice methods for buyer/affected person engagement.

Strategy:

Speech recognition, voice-centric UX design, and multimodal dialogue capabilities.

Strengths:

  • Excessive stage of interplay and consumer engagement
  • Broadly adopted in healthcare, with ~200 medical establishments utilizing their options

Use instances:

Voice assistants are deployed in healthcare amenities for consultations and affected person help.

10. Cohere – Enterprise‑Scale Generative & Agentic AI Brokers

Cohere affords a robust LLM-based platform delivering agent options tailor-made for the healthcare and finance sectors, with deep integration into enterprise ecosystems.

 AI Agents into Real Business

Focus areas:

  • Generative AI brokers, Aya Imaginative and prescient, and different superior LLM options
  • Integration with main enterprise methods like Oracle, Salesforce, and Dell

Strategy:

LLM fine-tuning, retrieval-augmented technology (RAG) brokers, and enterprise-grade deployment.

Key benefits:

  • Trusted by massive company shoppers
  • Excessive scalability and sturdy multi-agent orchestration

Use instances:

AI agent options for the finance and healthcare sectors that includes deep LLM integrations and contextual reasoning.

Firm Core Focus Key Strengths Typical Shoppers / Industries
SCAND Customized brokers, voice and NLP assistants Flexibility, safety, Agile method Fintech, Healthcare, Logistics, eCommerce, Retail, Authorized, Telecom, Large Tech integrations
Deviniti Safe, self-hosted brokers for regulated industries Full knowledge management, compliance Finance, Authorized, Compliance-heavy sectors
Grasp of Code Conversational AI, enterprise multi-agent Finish-to-end supply, ISO 27001 certification World manufacturers, CRM/ERP integration
ManoByte B2B-oriented agentic options Sturdy enterprise alignment, course of orchestration Mid-market / Enterprise B2B
SoluLab Multimodal brokers for cross-industry use Flexibility, Fortune 500 shoppers eCommerce, Fintech, Healthcare
Markovate Advertising & conversational brokers Conversion advertising, personalization Retail, eCommerce
10Clouds Product-led AI agent options UX + ML experience, quick product launch Startups, SMEs, product groups
NICE Automating enterprise CS workflows Orchestration, excessive automation charges Telecom, Contact Facilities, Finance
SoundHound Voice-first brokers, Amelia platform Voice interfaces, affected person engagement Healthcare, Voice-centric environments
Cohere Enterprise generative + multi-agent methods LLM fine-tuning, scalability, integrations Finance, Healthcare, Large Tech integrations

Prime AI Agent Improvement Firms in 2025: Focus Areas, Strengths, and Business Match

Why SCAND Is One of many Finest AI Agent Improvement Firms in 2025

Whereas many firms are simply starting to discover the potential of AI brokers, SCAND is already integrating them into real-world enterprise processes. These aren’t experiments or chatbots created only for present — they’re well-designed, clever methods that really ship: participating with clients, helping workers, streamlining operations, and producing measurable outcomes.

What makes SCAND stand out? First, expertise: with over 25 years in software program growth and dozens of AI tasks, SCAND brings deep technical and area data.

Second, the method: each agent is tailor-made to the shopper’s particular wants, infrastructure, {industry} laws, and enterprise targets.

Third, the expertise stack: SCAND leverages top-tier instruments — from OpenAI and Rasa to LangChain and TensorFlow — and builds architectures which might be scalable, integrable, and safe.

That’s why, when companies search for the perfect AI agent growth firm in 2025, selecting SCAND isn’t about following a development — it’s about reaching actual outcomes.

build AI solutions

Conclusion

Firms that undertake AI brokers in time acquire extra than simply effectivity — they rework their total enterprise construction, making processes smarter and releasing individuals from routine duties. In a number of years, this received’t be a aggressive benefit — will probably be a requirement for survival.

To construct such a system, you want greater than a vendor — you want an engineering companion. SCAND doesn’t simply develop brokers — they flip concepts into practical, safe, and scalable AI software program options. That’s what it means to take expertise significantly.

 

javascript – Marker not rendering on first map faucet — solely seems after second faucet, zoom, or any interplay (Expo SDK 53, RN 0.79.5, react-native-maps 1.20.1)


I am encountering a wierd habits with the Marker element in react-native-maps when including markers dynamically.

After I faucet the map after including a marker to the editingMarkers state, the principalMarker (the inexperienced one representing the most recent tapped level) would not seem instantly.

But when I do any interplay afterward — zoom, pan, faucet once more, open the FAB menu, and many others. — then the marker instantly renders as anticipated.

It looks like the primary render is being ignored or delayed till a facet interplay forces a re-render.


Setup

  • Expo SDK: ~53.0.20
  • React Native: 0.79.5
  • react-native-maps: 1.20.1

Hook & Handlers

const [markersOnEdit, setMarkersOnEdit] = useState([]);
const [principalMarker, setPrincipalMarker] = useState(null);

const handleMapPress = (occasion: MapPressEvent) => {
  setPrincipalMarker({
    latitude: occasion.nativeEvent.coordinate.latitude,
    longitude: occasion.nativeEvent.coordinate.longitude,
  });
};

const addNewMarker = () => {
  if (!principalMarker) return;

  const epsilon = 0.00001;
  const alreadyExists = markersOnEdit.some(
    (m) =>
      Math.abs(m.latitude - principalMarker.latitude) < epsilon &&
      Math.abs(m.longitude - principalMarker.longitude) < epsilon
  );

  if (alreadyExists) {
    // That is for forcing rendering
    setMarkersOnEdit((prev) => [...prev]);
    setPrincipalMarker({ ...principalMarker });
    return;
  }

  const newMarker: EditablePoint = {
    id: generateId(),
    latitude: principalMarker.latitude,
    longitude: principalMarker.longitude,
  };

  setMarkersOnEdit((prev) => [...prev, newMarker]);
  setPrincipalMarker(null);
};

MapView + Marker rendering


  
  {principalMarker !== null && (
    
  )}

  {markersOnEdit.map((level) => (
    
  ))}


Anticipated

As quickly as I set principalMarker, it ought to render immediately.


Precise

It would not render till one other interplay occurs.


Tried thus far

  • Verified the state updates with console.log
  • Confirmed principalMarker has right coordinates
  • Pressured re-renders with unfold ({ ...marker }) or cloning arrays
  • Tried calling setTimeout(() => setPrincipalMarker(...), 0)
  • Tried mapRef.present?.forceUpdate();

Questions

  • Is that this a bug with react-native-maps 1.20.1 or a quirk with React 19 / Expo SDK 53?
  • Is there any identified workaround to power the marker to render on first map press?
  • Anybody skilled comparable points or discovered a dependable repair?

Thanks prematurely 🙏